/*
 * @Author: Eli.Chen
 * @Date: 2025-03-07 12:29:38
 * @LastEditors: Eli.Chen
 * @LastEditTime: 2025-03-07 17:53:31
 * @Description:
 */
import React from 'react';
import ReactDOM from 'react-dom/client';
import reportWebVitals from './reportWebVitals';
import { RouterProvider } from 'react-router-dom';
import { ConfigProvider } from 'antd';

import router from './router';
import './index.css';
import App from './App';
import configureTheme from './config/theme';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import { Provider } from 'react-redux';
import { store } from './store';

// 配置主题
configureTheme();

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
    <React.StrictMode>
        <Provider store={store}>
            <ConfigProvider theme={configureTheme()}>
                <RouterProvider router={router}>
                    <App />
                </RouterProvider>
            </ConfigProvider>
        </Provider>
    </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
